import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
    {
        path: "/login",
        name: "login",
        component: () => import("../views/LoginView.vue"),
    },
    {
        path: "/admin",
        name: "admin",
        component: () => import("../components/AdminTpl.vue"),
        children: [
            {
                path: "home",
                name: "adminhome",
                component: () => import("../views/admin/HomeView.vue"),
            },
            {
                path: "list",
                name: "adminlist",
                component: () => import("../views/admin/ListView.vue"),
            },
        ]
    }
]

const router = new VueRouter({
    routes,
})
export default router;